<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">
	</head>

	<body style="padding: 0px;">
		<div class="easyui-layout" style="width:100%;height:600px;">
			<div data-options="region:'center'">
				<div>
					<table id="dg" class="easyui-datagrid">
					</table>
				</div>
			</div>
		</div>
		<div id="toolbar"></div>
	</body>
	<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
	<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../../../JS/common.js"></script>
	<script type="text/javascript" src="../../../JS/SHA-1.js"></script>
	<script>
		var currid = getID(); /**得到当前界面的ID**/
		var content = ""; /*定义一个空的content*/
		content = AddToolBar(1 + TOOLBAR_REDO); /**根据用户的权限，来决定生成ToolBar的哪些功能**/
		$("#toolbar").append(content); /*在ID=toolbar的标记后面添加content中的内容*/
		function newdata() {
			AddTabIn("创建配送单", parent.parent.$('#tabs'), "UI/LOGISTICS/DeliverManagementCreate/DeliverManagementSelect.html");
		}
		
		function redodata(){
			checkAllData("/logistics/deliverorder/list.do");
		}

		$('#dg').datagrid({
			url: RemoteLinkAddress + '/logistics/deliverorder/list.do',
			toolbar: '#toolbar',
			method: 'get',
			pagination: 'true',
			rownumbers: 'true',
			autoRowHeight: 'true',
			fitColumns: 'false',
			singleSelect: true,
			height: 350,
			/*表格中的列名以及各自列名的ID*/
			columns: [
				[{
					field: 'ID',
					title: '编号',
					width: '7%',
					align: 'center'
				}, {
					field: 'ORDER_NO',
					title: '配送单号',
					width: '15%',
					align: 'center'
				}, {
					field: 'DELIVERY_MAN',
					title: '配送员',
					width: '12%',
					align: 'center'
				}, {
					field: 'DELIVERY_METHOD',
					title: '配送方式',
					width: '15%',
					align: 'center'
				}, {
					field: 'DISTRIBUTION_DATE',
					title: '配送时间',
					width: '12%',
					align: 'center'
				}, {
					field: 'CREATE_TIME',
					title: '建单时间',
					width: '12%',
					align: 'center',
				}, {
					field: 'LUMP_SUM',
					title: '配送费用',
					width: '12%',
					align: 'center',
					formatter: function(value, row, index) {
						if(value) {
							return "￥" + value;
						}
					},
				}, {
					field: 'ISVERIFY',
					title: '审核状态',
					width: '14%',
					align: 'center',
					formatter: function(value, row, index) {
						return verifyStatus(value, false);
					}
				}]
			],
			onDblClickRow: function(index, row) {
				var pLocation = "";
				pLocation = "UI/LOGISTICS/DeliverManagementOrder/DeliverManagementOderModi.html?id=" + row.ID; /*将BoothManagementAdd.html的相对路径与被选中行的ID赋值给pLocation*/
				AddTabIn("配送单详情", parent.parent.$("#tabs"), pLocation);
			}
		});
	</script>

</html>